All Questions
15 questions
2votes
2answers
97views
Registering listeners according to SOLID pricipals
I'm practicing oop concepts these days. To figure it out I tried the below problem. There is a sensor monitoring system. It is a simple system that prints a value, ...
1vote
3answers
114views
"Human" interfaces with two implementation classes
The Helloworld class executes all of the methods. Human is the interface, and Nate & <...
2votes
1answer
3kviews
Implementation of generic unordered list in java
This question is a follow-up question of this question. These features are added to the new class - Generic class User is capable of setting the size ...
1vote
2answers
2kviews
Creating a Student class for a project
To recover from yesterday's disaster, I re-read the SOLID principles and refactored my code. Hopefully I did a better job than yesterday. I wanted to keep my Student...
3votes
3answers
5kviews
OOP modelling of a car agency
Exercise: A car dealer wants a computer system to manage the data of their vehicles and classify them by type. All cars have the following data Engine serial number Brand Year ...
9votes
1answer
3kviews
OOP modeling of a boat rental system
I have some question about this exercise, did I model the problem correctly (the code works)?. If I did it correctly, Is there anything that can improve the code?. For example, how could I avoid the ...
7votes
2answers
320views
Object-oriented Quarantine implementation
I am a newbie in thinking object oriented solution for a problem, so I am trying to improve. I have tried to implement a quarantine assignment. Here is a requirement with unit test cases. I am trying ...
6votes
1answer
3kviews
Generating RPG Characters (Objects)
I am a beginner Java programmer. I have just finished up an assignment and would appreciate some advice and/or constructive criticism on my program. I am trying to ensure I do not advance my knowledge ...
4votes
3answers
5kviews
Generating 50 Random Shapes
I am a beginner Java programmer. I have just finished up an assignment and would appreciate some advice and/or constructive criticism on my program. For context, I have the assignment details, ...
0votes
2answers
240views
Very complicated Java HelloWorld app
This program attempts to shows the basic concepts of inheritance and polymorphism. In what ways could the code be modified to better demonstrate those concepts? The interface, abstract class and the ...
3votes
1answer
125views
Overloaded applyRestrictionsToCriteria(…) methods
We want to refactor two methods that are exactly the same, except for one difference: one takes an org.hibernate.Criteria and the other ...
2votes
0answers
121views
Interface modelling for a journaling program in Java
My program's Journal consists of unique Pages identified by their Day. Within those pages ...
2votes
4answers
246views
Making a better Engineer
I have an Engineer which doesn't look very good. How can I make him better organized? What about good practices? Interface: ...
10votes
2answers
444views
Functional interface hierarchy in Java 8
I just created the following code and am wondering whether it is logically correct (all other feedback is of course also welcome): ...
2votes
1answer
677views
Ogg audio format conversion classes
This is my command interface: public interface IConverter { void convert(); } This is my Receiver class: ...